package temp.lho.lws.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import temp.lho.lws.mapper.FlowinfomationMapper;
import temp.lho.lws.mapper.IBaseMapper;
import temp.lho.lws.pojo.Flowinfomation;
import temp.lho.lws.service.IFlowinfomationService;
import temp.lho.lws.vo.Accident;
import temp.lho.lws.vo.LoginVo;

import java.util.List;

/**
 * (Flowinfomation)表服务实现类
 *
 * @author makejava
 * @since 2020-07-06 23:15:37
 */
@Service("flowinfomationService")
public class FlowinfomationServiceImpl extends BaseServiceImpl<Flowinfomation> implements IFlowinfomationService {

    @Autowired
    private FlowinfomationMapper flowinfomationMapper;

    @Override
    protected IBaseMapper<Flowinfomation> baseMapper() {
        return flowinfomationMapper;
    }

    @Override
    public List<Flowinfomation> findFlowDetail(String taskname, Integer userId, Integer jobstate) {
        List<Flowinfomation> flowDetail = flowinfomationMapper.findFlowDetail(taskname, userId, jobstate);
        return flowDetail;
    }

    @Override
    public boolean updateJobStatus(Integer taskid, Integer jobstate ,Integer transmitstate, LoginVo user) {
        return flowinfomationMapper.updateJobStatus(taskid,jobstate,transmitstate,user) > 0;
    }

    @Override
    public boolean addNextFlow(Flowinfomation flowinfomation) {
        return flowinfomationMapper.addNextFlow(flowinfomation) > 0;
    }

    @Override
    public int insert(Accident accident) {
        return flowinfomationMapper.insert(accident);
    }

    @Override
    public int Fupdate(int jobState,  String claimMainId) {
        return flowinfomationMapper.Fupdate(jobState,claimMainId);
    }

    @Override
    public Flowinfomation findByTaskId(Integer taskid) {
        return flowinfomationMapper.findByTaskId(taskid);
    }
}